<template>
  <basic-container>
    <avue-crud v-bind="bindVal"
               v-on="onEvent"
               :page.sync="page"
               :search.sync="searchFrom"
               v-model="form">

      <template slot-scope="{disabled,size}"
                slot="clientCodeSearch">
        <el-input placeholder="请输入客户端编码"
                  :disabled="disabled"
                  :size="size"
                  v-model="searchFrom.clientCode_eq"></el-input>
      </template>

      <template slot="exceptionName" slot-scope="scope">
        <el-tag>{{scope.row.exceptionName | getName}}</el-tag>
      </template>

      <template slot="createTime" slot-scope="scope">
        <el-tag>{{scope.row.createTime}}</el-tag>
      </template>

      <template slot="expand" slot-scope="{row}">
        <pre>{{row.error}}</pre>
      </template>

    </avue-crud>
  </basic-container>
</template>

<script>


export default window.$crudCommon({
  data () {
    return {

    }
  },
  created () {
  },
  watch: {
  },
  filters: {
    getName(exceptionName) {
      const e = exceptionName.split(".");
      return e[e.length-1];
    }
  },
  methods: {

  }
}, {
  name: '/log/error',
  res: (data) => {
    return {
      total: data.data.total,
      data: data.data.records
    }
  }
})
</script>

<style lang="scss" scoped>


</style>
